ConcurrentBag(T) Methods

Task Parallel System.Threading

The ConcurrentBag<(Of <(T>)>) type exposes the following members.

Methods

  NameDescription
Add
Adds an object to the ConcurrentBag<(Of <(T>)>).
CopyTo
Copies the ConcurrentBag<(Of <(T>)>) elements to an existing one-dimensional Array, starting at the specified array index.
Equals (Inherited from Object.)
Finalize (Inherited from Object.)
GetEnumerator
Returns an enumerator that iterates through the ConcurrentBag<(Of <(T>)>).
GetHashCode (Inherited from Object.)
GetType (Inherited from Object.)
MemberwiseClone (Inherited from Object.)
ToArray
Copies the ConcurrentBag<(Of <(T>)>) elements to a new array.
ToString (Inherited from Object.)
TryPeek
Attempts to return an object from the ConcurrentBag<(Of <(T>)>) without removing it.
TryTake
Attempts to remove and return an object from the ConcurrentBag<(Of <(T>)>).

Explicit Interface Implementations

  NameDescription
ICollection..::.CopyTo
Copies the elements of the ICollection to an Array, starting at a particular Array index.
IEnumerable..::.GetEnumerator
Returns an enumerator that iterates through the ConcurrentBag<(Of <(T>)>).
IProducerConsumerCollection<(Of <(T>)>)..::.TryAdd
Attempts to add an object to the ConcurrentBag<(Of <(T>)>).

See Also